home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / demos / demobook / UxXt.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  3.8 KB  |  107 lines

  1. /*
  2.  * Copyright 1993, 1994, Silicon Graphics, Inc.
  3.  * All Rights Reserved.
  4.  *
  5.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6.  * the contents of this file may not be disclosed to third parties, copied or
  7.  * duplicated in any form, in whole or in part, without the prior written
  8.  * permission of Silicon Graphics, Inc.
  9.  *
  10.  * RESTRICTED RIGHTS LEGEND:
  11.  * Use, duplication or disclosure by the Government is subject to restrictions
  12.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15.  * rights reserved under the Copyright Laws of the United States.
  16.  */
  17. /*****************************************************************************/
  18. /***                                                                       ***/
  19. /***             Copyright (c) 1991, Visual Edge Software Ltd.             ***/
  20. /***                                                                       ***/
  21. /***   ALL RIGHTS RESERVED.  This notice is  intended  as  a  precaution   ***/
  22. /***   against  inadvertent publication, and shall not be deemed to con-   ***/
  23. /***   stitute an acknowledgment that publication has  occurred  nor  to   ***/
  24. /***   imply  any  waiver  of confidentiality.  The year included in the   ***/
  25. /***   notice is the year of the creation of the work.                     ***/
  26. /***                                                                       ***/
  27. /*****************************************************************************/
  28. /*                UxXt.h                             */
  29. /*****************************************************************************/
  30.  
  31. #ifndef    _UX_XT_H_
  32. #define    _UX_XT_H_
  33.  
  34. /* The following macros are used in converting string values to the form
  35.    required by the widgets */
  36.  
  37. #define    RES_CONVERT( res_name, res_value) \
  38.     XtVaTypedArg, (res_name), XmRString, (res_value), strlen(res_value) + 1
  39.  
  40. #define    UxPutStrRes( wgt, res_name, res_value ) \
  41.     XtVaSetValues( wgt, RES_CONVERT( res_name, res_value ), NULL )
  42.  
  43.  
  44. #ifndef UX_INTERPRETER    /* Omit this section when interpreting the code */
  45.  
  46. /* The following macros are supplied for compatibility with swidget code */
  47. #define    swidget            Widget
  48. #define    UxWidgetToSwidget(w)    (w)
  49. #define    UxGetWidget(sw)        (sw)
  50. #define    UxIsValidSwidget(sw)    ((sw) != NULL)
  51.  
  52. #define    no_grab            XtGrabNone
  53. #define    nonexclusive_grab    XtGrabNonexclusive
  54. #define    exclusive_grab        XtGrabExclusive
  55.  
  56.  
  57. /* The following global variables are defined in the main() function */
  58. extern XtAppContext DBapp_context;
  59. extern Widget DBtoplevel;
  60.  
  61. extern  XtAppContext    UxAppContext;
  62. extern  Widget        UxTopLevel;
  63. extern  Display        *UxDisplay;
  64. extern  int        UxScreen;
  65.  
  66.  
  67. /* The following are error codes returned by the functions in UxXt.c */
  68. #define UX_ERROR           -1
  69. #define UX_NO_ERROR        0
  70.  
  71. Boolean UxNotifyFlag;
  72. extern  void    UxWaitForNotify();
  73. extern  void    UxNotify();
  74.  
  75. /* The following are declarations of the functions in UxXt.c */
  76.  
  77. #ifdef _NO_PROTO
  78.  
  79. extern  int    UxPopupInterface();
  80. extern  int    UxPopdownInterface();
  81. extern  int    UxDestroyInterface();
  82. extern  int    UxPutContext();
  83. extern  caddr_t    UxGetContext();
  84. extern  void    UxFreeClientDataCB();
  85. extern  void    UxLoadResources();
  86. extern  int    UxFileExists();
  87.  
  88.  
  89. #else
  90.  
  91. extern  int    UxPopupInterface( Widget wgt, XtGrabKind grab_flag );
  92. extern  int    UxPopdownInterface( Widget wgt );
  93. extern  int    UxDestroyInterface( Widget wgt);
  94. extern  int    UxPutContext( Widget wgt, caddr_t context );
  95. extern  caddr_t    UxGetContext( Widget wgt );
  96. extern  void    UxFreeClientDataCB( Widget wgt, XtPointer client_data,
  97.                  XtPointer call_data );
  98. extern  void    UxLoadResources( char *fname );
  99. extern  int    UxFileExists( char *fname );
  100.  
  101. #endif /* _NO_PROTO */
  102.  
  103. #endif /* ! UX_INTERPRETER */
  104.  
  105. #endif /* ! _UX_XT_H_ */
  106.  
  107.